package com.lwy.goods.controller;


import com.lwy.common.Result;
import com.lwy.common.StatusCode;
import com.lwy.goods.pojo.TbSeckill;
import com.lwy.goods.pojo.TbUser;
import com.lwy.goods.service.impl.TbSeckillServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("seckill")
public class TbSeckillController {

    @Resource
    TbSeckillServiceImpl tbSeckillService;

    @RequestMapping("list")
    public Result<List<TbSeckill>> list(){

        List<TbSeckill> list = tbSeckillService.list();
        return new Result<List<TbSeckill>>(true, StatusCode.OK,"秒杀商品查询",list);
    }
}
